//
// Created by richard on 2019/11/18.
//

#ifndef GREENHOUSEMA_SIMQBUTTON_H
#define GREENHOUSEMA_SIMQBUTTON_H

#include <QPushButton>

class SimQButton : public QPushButton{
    Q_OBJECT
public:
    explicit SimQButton(const QString &text, QWidget *parent, uint8_t *outputAddr);
    virtual ~SimQButton();

    void revertPush(bool flag);

private:
    uint8_t * outputAddr = nullptr;
    bool revertFlag = false;
    void handlePress();
    void handleRelease();
};


#endif //GREENHOUSEMA_SIMQBUTTON_H
